home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 2 / Amiga Tools 2.iso / grafik / bildanzeiger / seepix / source.lha / MkID.c < prev    next >
Text File  |  1992-11-27  |  5KB  |  106 lines

  1. /**MkID.c****************************************************************
  2.  *                                    *
  3.  *   SeePix -- by Hank Schafer                        *
  4.  *                                    *
  5.  *   SeePix is an IFF Picture Viewer.  It works with Lo-Res,        *
  6.  *   Med-Res, Hi-Res, HAM, and EHB formats.  I'm working on support     *
  7.  *   for X-Specs, and Anim5 formats.                    *
  8.  *                                    *
  9.  *   SeePix is based on a program by Olaf Barthel, called        *
  10.  *   'LoadImage'.  As released, LoadImage had a couple of bugs.     *
  11.  *   The Amiga-Key alternatives to menu use didn't all work.  That's    *
  12.  *   been fixed.  There were two separate print functions in LoadImage    *
  13.  *   which behaved exactly the same.  The redundancy was eliminated.    *
  14.  *   LoadImage used the Topaz ROMFONT, and made no allowances for a    *
  15.  *   different system default font (under 2.04).  I added a built-in    *
  16.  *   font.  I've reworked the code considerably from the original       *
  17.  *   release, to allow for optimizations based on time and space.    *
  18.  *                                    *
  19.  *   SeePix features a palette tool which allows "tweaking" of colors    *
  20.  *   prior to printing, allowing you to modify the color printout to    *
  21.  *   more closely resemble the original graphics (Blue is Blue, not    *
  22.  *   Purple).  SeePix can be Iconified.  SeePix features an ARP     *
  23.  *   interface.  SeePix now uses the PathMaster File Selector.        *
  24.  *                                    *
  25.  ************************************************************************
  26.  *                                                                      *
  27.  *   SeePix Copyright © 1992 by Hank Schafer; all rights reserved.      *
  28.  *                                                                      *
  29.  *   This program is free software; you can redistribute it and/or      *
  30.  *   modify it under the terms of the GNU General Public License as     *
  31.  *   published by the Free Software Foundation, either version 1, or    *
  32.  *   (at your option) any later version.                                *
  33.  *                                                                      *
  34.  *   This program is distributed in the hope that it will be useful,    *
  35.  *   but WITHOUT ANY WARRANTY; without even the implied warranty of     *
  36.  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU  *
  37.  *   General Public License for more details.                           *
  38.  *                                                                      *
  39.  *   You should have received a copy of the GNU General Public License  *
  40.  *   along with this program; if not, write to:                         *
  41.  *                 Free Software Foundation, Inc.                       *
  42.  *                 675 Massachusetts Ave.                               *
  43.  *                 Cambridge  MA  02139, USA                            *
  44.  *                                                                      *
  45.  **************** Special Function Copyright Notices ********************
  46.  *                                    *
  47.  ****LoadImage Copyright Notice:                    *
  48.  *                                    *
  49.  *   LoadImage is © Copyright 1988, 1989, 1990 by MXM, all rights    *
  50.  *   reserved, written by Olaf Barthel.  No guarantees of any kind are    *
  51.  *   made that this program is 100% reliable.  Use this program on    *
  52.  *   your own risk!                            *
  53.  *                                    *
  54.  ****Iconify Copyright Notice:                        *
  55.  *                                    *
  56.  *   Copyright 1987 by Leo L. Schwab.                    *
  57.  *   Permission is hereby granted for use in any and all programs,    *
  58.  *   both Public Domain and commercial in nature, provided this     *
  59.  *   Copyright notice is left intact.                    *
  60.  *                                    *
  61.  ****ColorWindow (Palette) Copyright Notice:                *
  62.  *                                    *
  63.  * ColorWindow Routine    --  Color Window Routines            *
  64.  *     from Book 1 of the Amiga Programmers' Suite by RJ Mical          *
  65.  *                                    *
  66.  * Copyright (C) 1986, 1987, Robert J. Mical                *
  67.  * All Rights Reserved.                         *
  68.  *                                    *
  69.  ****PathMaster Copyright Notice:                    *
  70.  *                                    *
  71.  * -------------------------------------------------------------------- *
  72.  *   Copyright © 1989 Justin V. McCormick.  All Rights Reserved.    *
  73.  * -------------------------------------------------------------------- *
  74.  *                                    *
  75.  *    The PathMaster name is a trademark of Justin V. McCormick.    *
  76.  *                                    *
  77.  *   PathMaster File Selector source and documentation written by:    *
  78.  *                                    *
  79.  *             Justin V. McCormick.                *
  80.  *           Copyright © 1989 by Justin V. McCormick.         *
  81.  *             All Rights Reserved.                *
  82.  *                                    *
  83.  * -------------------------------------------------------------------- *
  84.  ************************************************************************
  85.  *                                    *
  86.  *   Hope this is something you can use and enjoy.            *
  87.  *                                    *
  88.  ************************************************************************/
  89.  
  90. /*
  91.  * MkID(IDString) :
  92.  *
  93.  * Transforms a string into a chunk ID. How can we do this in a macro
  94.  * expression? Just don't know.
  95.  */
  96.  
  97. ULONG
  98. MkID(char *IDString)
  99. {
  100.     ULONG        LongID;
  101.  
  102.     LongID = (IDString[0] << 24) | (IDString[1] << 16) | (IDString[2] << 8) | (IDString[3]);
  103.  
  104.     return (LongID);
  105. }
  106.